<table class="table jstable" id="payments">
    <caption>{{payments_caption}}</caption>
    <thead>
        <tr>
            <th>id</th>
            <th>Date</th>
            {% if from %}
                <th>To</th>
            {% else %}
                {% if to %}
                    <th>From</th>
                {% else %}
                    <th>To/From</th>
                {% endif %}
            {% endif %}
            
            <th class="money">Amount</th>
        </tr>
    </thead>
    <tbody>
    {% for payment in payments %}
        {% if payment.from_account.user == user %}
            {% if account_linked %}
            {% include 'cli/cli_payment_table_row.html' with payment=payment account_linked='True' from_account='True' %}
            {% else %}
            {% include 'cli/cli_payment_table_row.html' with payment=payment from_account='True' %}
            {% endif %}
		{% else %}
            {% if account_linked %}
            {% include 'cli/cli_payment_table_row.html' with payment=payment account_linked='True' %}
            {% else %}
            {% include 'cli/cli_payment_table_row.html' with payment=payment %}
            {% endif %}
        {% endif %}
    {% endfor %}
    </tbody>
</table>
